﻿// <copyright file="MultiScaleImageLocation.cs" company="Microsoft Corporation">
// Copyright (c) 2009 Microsoft Corporation All Rights Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2010-01-12</date>
// <summary>MultiScaleImageLocation class definition</summary>

namespace Microsoft.WebAnalytics.Media
{
    using System.Collections.ObjectModel;
    using System.ComponentModel;
    using System.Windows;
    using Microsoft.WebAnalytics.Data;

    /// <summary>
    /// A Deep Zoom location to track with the Silverlight Analytics Framework
    /// </summary>
    public class MultiScaleImageLocation
    {
        /// <summary>
        /// Initializes a new instance of the MultiScaleImageLocation class.
        /// </summary>
        public MultiScaleImageLocation()
        {
            this.CustomProperties = new Collection<PropertyValue>();
        }

        /// <summary>
        /// Gets or sets the name to track in the AnalyticsEvent.ActionValue
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the viewport width to compare against
        /// </summary>
        public double ViewportWidth { get; set; }

        /// <summary>
        /// Gets or sets the Viewport origin to compare against
        /// </summary>
        public Point ViewportOrigin { get; set; }

        /// <summary>
        /// Gets or sets the tolerance in to compare the ViewportOrigin to the MultiScaleImage.ViewportOrigin
        /// </summary>
        public double OriginTolerance { get; set; }
        
        /// <summary>
        /// Gets or sets the tolerance in to compare the ViewportWidth to the MultiScaleImage.ViewportWidth
        /// </summary>
        public double WidthTolerance { get; set; }

        /// <summary>
        /// Gets the custom properties
        /// </summary>
        public Collection<PropertyValue> CustomProperties { get; private set; }
    }
}
